<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/taglib.jsp" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

    <title>聚人消费网络有限公司</title>

    <link type="text/css" href="${ctx}/css/style.css" rel="stylesheet"/>
    <!-- the layout css file -->
    <link type="text/css" href="${ctx}/css/jquery.cleditor.css" rel="stylesheet"/>

    <script type='text/javascript' src='${ctx}/js/jquery-1.4.2.min.js'></script>
    <!-- jquery library -->
    <script type='text/javascript' src='${ctx}/js/jquery-ui-1.8.5.custom.min.js'></script>
    <!-- jquery UI -->
    <script type='text/javascript' src='${ctx}/js/cufon-yui.js'></script>
    <!-- Cufon font replacement -->
    <script type='text/javascript' src='${ctx}/js/colaboratelight_400.font.js'></script>
    <!-- the Colaborate Light font -->
    <script type='text/javascript' src='${ctx}/js/easytooltip.js'></script>
    <!-- element tooltips -->
    <script type='text/javascript' src='${ctx}/js/jquery.tablesorter.min.js'></script>
    <!-- tablesorter -->
    <script type="text/javascript" src='${ctx}/js/jquery.validate.js'></script>

    <script type='text/javascript' src='${ctx}/js/visualize.jquery.js'></script>
    <!-- visualize plugin for graphs / statistics -->
    <script type='text/javascript' src='${ctx}/js/iphone-style-checkboxes.js'></script>
    <!-- iphone like checkboxes -->
    <script type='text/javascript' src='${ctx}/js/jquery.cleditor.min.js'></script>
    <!-- wysiwyg editor -->

    <script type='text/javascript' src='${ctx}/js/custom.js'></script>
    <!-- the "make them work" script -->


    <link href="${ctx}/css/default.css" rel="stylesheet" type="text/css"/>

    <meta charset="UTF-8">

</head>

<body>

<div id="container">
    <div id="bgwrap">

        <div id="primary_left">

            <div id="logo">
                <a href="#" title="Dashboard"><img src="${ctx}/assets/LogoMaker.png" width="220" height="48"
                                                   alt=""/></a>
            </div>
            <!-- logo end -->

            <div id="menu"> <!-- navigation menu -->
                <ul>
                    <li><a href="${ctx}/forward/index/html" class="dashboard"><img
                            src="${ctx}/assets/icons/small_icons_3/dashboard.png" alt=""/><span
                            class="current">首页</span></a></li>
                    <li><a href="${ctx}/user/userManager" class="dashboard"><img
                            src="${ctx}/assets/icons/small_icons_3/users.png" alt=""/><span
                            class="current">用户管理</span></a></li>
                    <li class="current"><a href="${ctx}/catalog" class="dashboard"><img
                            src="${ctx}/assets/icons/small_icons_3/media.png" alt=""/><span
                            class="current">产品管理</span></a></li>
                    <li class="fade_hover tooltip" title="返回网站主页">
                        <a href="${ctx}">
                            <img src="${ctx}/assets/icons/dashboard/back.png" alt=""/>
                            <span>返回网站主页</span>
                        </a>
                    </li>
                </ul>
            </div>
            <!-- navigation menu end -->
        </div>
        <!-- sidebar end -->
        <div id="primary_right">
            <div class="inner" style="width: 78%;">


                <ul class="dash">


                    <li class="fade_hover tooltip" title="返回">
                        <a href="${ctx}/image/${image ==null ? albumId : image.imageAlbum.id}">
                            <img src="${ctx}/assets/icons/dashboard/back.png" alt=""/>
                            <span>返回</span>
                        </a>
                    </li>
                    <li class="fade_hover tooltip" title="批量添加">
                        <a href="${ctx}/image/batchUpload/${albumId}">
                            <img src="${ctx}/assets/icons/dashboard/batch_upload.png" alt=""/>
                            <span>批量添加</span>
                        </a>
                    </li>

                    <li class="fade_hover tooltip " title="退出系统">
                        <a href="${ctx}/user/logout">
                            <img src="${ctx}/assets/icons/dashboard/118.png" alt=""/>
                            <span>注销</span>
                        </a>
                    </li>

                </ul>
                <!-- end dashboard items -->


                <div class="clearboth"></div>

                <hr/>
                <span style="font-size: 28px;font-weight: bold;">产品${image ==null ? "新增" : "修改"}</span>
                <fieldset style="margin-top: 15px;">
                    <legend>本界面只能上传gif、png、jpge图片格式文件!</legend>
                    <div id="content">
                        <form action="${ctx}/image/${image ==null ? "uploadImage" : "updateAction"}" method="post" name="thisform"
                              enctype="multipart/form-data">
                            <input value="${token}" type="hidden" name="token"/>
                            <c:if test="${image ==null}">
                                <input id="albumId" type="hidden" name="albumId"
                                       value="${albumId}">
                            </c:if>
                            <c:if test="${image !=null}">
                                <input id="imageId" type="hidden" name="imageId"
                                       value="${image.id}">
                                <input id="albumId" type="hidden" name="albumId"
                                       value="${image.imageAlbum.id}">
                            </c:if>
                            <table>
                                <tr valign="top">
                                    <td>
                                        <div>
                                            <div class="fieldset flash" id="fsUploadProgress1">
                                                <span class="legend">产品图片（100MB）</span>
                                                <input class="mf" type="file" name="file"/>
                                            </div>
                                            <p>
                                                <label style="width: auto;">产品名称：</label>
                                                <input class="mf" id="name" name="name" type="text"
                                                       value="${image ==null ? "" : image.name}" style="height: 20px;"/>
                                                </br><label style="width: auto;">价&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;格：</label>
                                                <input class="mf" id="price" name="price" type="text"
                                                       value="${image ==null ? "" : image.price}" style="height: 20px;"/>
                                                <textarea class="editor" id="desc" name="desc">${image ==null ? "产品介绍" : image.descript}</textarea>
                                            </p>

                                            <div style="padding-left: 5px;">
                                                <input class="button" type="submit" value="保存"/>
                                                <br/>
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                            </table>

                        </form>
                    </div>

                    <div class="clearboth"></div>
                </fieldset>

                <div class="clearboth"></div>


            </div>
            <!-- inner -->
        </div>
        <!-- primary_right -->
    </div>
    <!-- bgwrap -->
</div>
<!-- container -->
</body>
</html>
